package file;

import java.io.File;

public class CreateNewFileDemo {
    public static void main(String[] args) {
       File file=new File("./test.txt");

      // File file= new File("./abc/test.txt")

       if (file.exists()){
           System.out.println("改文件已存在");
       }else {
           file .canExecute();
           System.out.println("文件已创建");
       }

    }
}
